<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2023-01-11 20:03:19
 * @Last Modified time: 2023-01-30 11:13:55
 */
namespace app\api\controller\weapp;	
use frank\base\BaseController;
use app\common\services\user\UserService;

/**
 * Class Login
 * @NoMiddleware("app\api\middleware\AuthMiddleware")
 */
class Login extends BaseController
{ 	
    /**
     * 授权登录
     * @method(POST)
     */
	public function auth(){
        $data = $this->request->param();
        [$id,$appType] = event('LoginAuth',['class'=>'login','data'=> $data]);
        $this->success('登录成功',UserService::instance()->login($id,$appType));
	}
}